import { makeAutoObservable } from "mobx"

import { channelList } from "@/api/api"

class ChannelStore {
  channelList = []
  constructor() {
    makeAutoObservable(this)
  }

  loadChannelList = async () => {
    const res = await channelList()
    this.channelList = res.data.channels
  }
}

export default ChannelStore
